package com.avic.map.common.model;

import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;

@Data
public class HistoryPositionModel implements Serializable {

    private static final long serialVersionUID = -7654045667180738985L;

    /**
     * 唯一标示
     */
    @Field("modelId")
    private String modelId;

    /**
     * 维度
     */
    @Field("latitude")
    private double latitude;

    /**
     * 经度
     */
    @Field("longitude")
    private double longitude;

    /**
     * 数据时间
     */
    private long id;

    public HistoryPositionModel(MapCommonModel newMapCommonModel) {
        this.modelId = newMapCommonModel.getModelId();
        this.latitude = newMapCommonModel.getLatitude();
        this.longitude = newMapCommonModel.getLongitude();
        this.id = newMapCommonModel.getDataTime();
    }

    public HistoryPositionModel() {
    }
}
